﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentNHibernate.Mapping;
using YasharEl.Infrastructure.ProcessEngine.EntityModel;
using YasharEl.Infrastructure.ProcessEngine.EntityModel.Prototype;
using YasharEl.Infrastructure.ProcessEngine.Prototype;

namespace YasharEl.Infrastructure.ProcessEngine.PersistenceModel.NHibernate.Prototype.Mappings
{
    public class ProcessDefinitionPropertyMappingEntityMap : SubclassMap<ProcessDefinitionPropertyMappingEntity>
    {
        public ProcessDefinitionPropertyMappingEntityMap()
        {
            DiscriminatorValue(ProcessDefinitionObjectType.ProcessDefinition.Value.ToString());

            References(e => e.PropertyDefinitionsContainer)
                .Column("PrototypedObjectId")
                .LazyLoad()
                .Class<ProcessDefinitionEntity>();
        }
    }
}
